package com.lulin.mall.order.utils;

import com.lulin.common.constant.OrderConstant;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * 订单信息消费者
 * 监听消息
 *
 * @author lulin
 * @date 2022/12/29 14:29
 */
@RocketMQMessageListener(topic = OrderConstant.ROCKETMQ_ORDER_TOPIC, consumerGroup = "${rocketmq.consumer.group}")
@Component
public class OrderMsgConsumer implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println("收到的消息：" + s);
        //订单关单的逻辑实现

    }
}
